<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>确认订单</title>
    <link rel="icon" type="image/x-icon" href="/images/logo.ico" />
    <link rel="stylesheet" href="/stylesheets/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/stylesheets/index.css">
</head>

<body>
    <div class="container">
        <%include header%>
    </div>

    <div class="container">
        <div class="row">
            <div class="col-xs-12 col-md-12">
                <p class="text-muted">订单号码 : <span class="color"><%=order.number%></span></p>
            </div>
            <div class="col-xs-7 col-md-7">
                <h5 class="text-muted">请选择收货地址 <a class="pull-right color" href="/presnol">管理收货地址</a></h5>
                <select class="form-control">
                    <%for(var i=0;i<adress.length;i++){%>
                    <option>地址 : <%=adress[i].place%><%=adress[i].detilplace%> 邮编 : <%=adress[i].zip_code%> 收货人 : <%=adress[i].who%> 联系电话 : <%=adress[i].phone%></option>
                    <%}%>    
                </select>
            </div>
            <div class="col-xs-12 col-md-12" style="margin-top:20px">
                <h4 class="text-muted" style="margin-bottom:20px">商品信息</h4>
                <div class="col-xs-12 col-md-12 text-muted" style="background:#e9e9e9;padding:10px 0px">
                    <div class="col-xs-6 col-md-6">购买信息</div>
                    <div class="col-xs-2 col-md-2">单价</div>
                    <div class="col-xs-2 col-md-2">数量</div>
                    <div class="col-xs-2 col-md-2">小计</div>
                </div>
                <div class="col-xs-12 col-md-12" style="padding:10px 0px;font-size:16px;border:1px solid #e9e9e9">
                    <%var num=0;money=0%>
                    <%for(var i=0;i<order.info.length;i++){%>
                        <div class="row" style="margin-top:15px;">
                            <div class="col-xs-6 col-md-6"><img src="/images/books/<%=order.info[i].img%>" style="width:100px;height:auto"><%=order.info[i].name%></div>
                            <div class="col-xs-2 col-md-2" style="line-height:100px">￥<%=order.info[i].money%></div>
                            <div class="col-xs-2 col-md-2" style="line-height:100px"><span style="margin-left:10px"><%=order.info[i].num%></span></div>
                            <div class="col-xs-2 col-md-2" style="line-height:100px">￥<%=(order.info[i].money)*(order.info[i].num)%></div>
                        </div>
                    <%num=parseInt(num)+parseInt(order.info[i].num)%>
                    <%money=parseInt(money)+parseInt((order.info[i].money)*(order.info[i].num))%>
                    <%}%>
                </div>
                <div class="col-xs-12 col-md-12 text-right" style="background:#e9e9e9;padding:10px">共 <%=num%> 件,总计 : <span class="color2" style="font-size:18px">￥<%=money%></span> 元</div>
                <div class="col-xs-12 col-md-12" style="margin-top:20px"><a href="/orderOk"><span class="nav_color subBtn pull-right" onclick="updataOrder('<%=money%>')">立即付款</span></a></div>
            </div>
        </div>
    </div>
</body>
<script src="/javascripts/orderOk.js"></script>
</html>